package com.hxm.pojo;

import lombok.AllArgsConstructor;

import java.io.Serializable;

/**
 * 
 * @TableName student
 */
@AllArgsConstructor
public class Student implements Serializable {
    /**
     * 
     */
    private Integer classno;

    /**
     * 
     */
    private Integer cid;

    /**
     * 
     */
    private String name;

    /**
     * 
     */
    private Integer age;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getClassno() {
        return classno;
    }

    /**
     * 
     */
    public void setClassno(Integer classno) {
        this.classno = classno;
    }

    /**
     * 
     */
    public Integer getCid() {
        return cid;
    }

    /**
     * 
     */
    public void setCid(Integer cid) {
        this.cid = cid;
    }

    /**
     * 
     */
    public String getName() {
        return name;
    }

    /**
     * 
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 
     */
    public Integer getAge() {
        return age;
    }

    /**
     * 
     */
    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Student other = (Student) that;
        return (this.getClassno() == null ? other.getClassno() == null : this.getClassno().equals(other.getClassno()))
            && (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getClassno() == null) ? 0 : getClassno().hashCode());
        result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", classno=").append(classno);
        sb.append(", cid=").append(cid);
        sb.append(", name=").append(name);
        sb.append(", age=").append(age);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}